package com.audaque.springboot.foshanupload.web.mbactdemo.mpgt.mapper;

import com.audaque.springboot.foshanupload.web.mbactdemo.mpgt.model.kbo.SysUserMpgtKbo;
import com.audaque.springboot.foshanupload.web.mbactdemo.mpgt.model.pojo.SysUserMpgtPojo;
import com.audaque.springboot.foshanupload.web.mbactdemo.mpgt.model.qo.SysUserMpgtQo;
import com.github.pagehelper.PageRowBounds;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author zgb
 * @since 2023-01-23
 */
@Repository
@Mapper
public interface SysUserMpgtMapper {

    void insert(@Param("sysUserMpgtPojo") SysUserMpgtPojo sysUserMpgtPojo);

    void update(@Param("sysUserMpgtPojo") SysUserMpgtPojo sysUserMpgtPojo);

    void insertOnDuplicateKey(@Param("sysUserMpgtKbo") SysUserMpgtKbo sysUserMpgtKbo, @Param("sysUserMpgtPojo") SysUserMpgtPojo sysUserMpgtPojo, @Param("duplicateYn") Boolean duplicateYn);

    void delete(@Param("id") String id, @Param("uuid") String uuid);

    List<Object> queryAndCount(@Param("sysUserMpgtKbo") SysUserMpgtKbo sysUserMpgtKbo, @Param("sysUserMpgtQo") SysUserMpgtQo sysUserMpgtQo);


    //mybatis原生内存分页：不含total,RowBounds不能为null，否则报空指针异常
    List<Map> queryOrCount(@Param("sysUserMpgtKbo") SysUserMpgtKbo sysUserMpgtKbo, @Param("sysUserMpgtQo") SysUserMpgtQo sysUserMpgtQo, RowBounds rowBound);
    //不分页
    List<Map> queryOrCount(@Param("sysUserMpgtKbo") SysUserMpgtKbo sysUserMpgtKbo, @Param("sysUserMpgtQo") SysUserMpgtQo sysUserMpgtQo );

    List<Map> queryOrCount(@Param("sysUserMpgtKbo") SysUserMpgtKbo sysUserMpgtKbo, @Param("sysUserMpgtQo") SysUserMpgtQo sysUserMpgtQo, PageRowBounds rowBound);
    List<Map> queryOrCount(@Param("sysUserMpgtKbo") SysUserMpgtKbo sysUserMpgtKbo, @Param("sysUserMpgtQo") SysUserMpgtQo sysUserMpgtQo,@Param("pageNum") int pageNum, @Param("pageSize") int pageSize);



}
